package jbit.service.impl;

import java.util.List;

import jbit.dao.EmployeeDao;
import jbit.entity.Employee;
import jbit.service.EmployeeService;

public class EmployeeServiceImpl implements EmployeeService{
	
	EmployeeDao employeeDao=null;
	public Employee login(Employee condition){
		List<Employee> userList=employeeDao.find(condition);	
		if(userList==null ||userList.size()!=1){
			return null;
		}else{
			return userList.get(0);
		}		
	}
	//依赖注入
	public EmployeeDao getEmployeeDao() {
		return employeeDao;
	}
	public void setEmployeeDao(EmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}
}
